var logo = document.getElementById("logo");
var showBg = getCookie("showBg");
if (showBg==null || showBg=="1") {
    showBg = "1";
}

function showBackground() {
    if (showBg=="1") {
        if (logo) {
            logo.style.visibility = "hidden";
        }
        document.body.style.backgroundImage = "url(http://bing.getlove.cn/bingImage)";
      } else {
        if (logo) {
            logo.style.visibility = "visible";
        }
        document.body.style.backgroundImage = null;
      }
}

function setBackground() {
    if (showBg=="1") {
        showBg = "0";
    } else {
        showBg = "1";
    }
    setCookie("showBg", showBg, 300);
    showBackground();
}

showBackground();